<?php

require_once 'control/common/calendar/form.php';
require_once 'view/adm/calendar/event.edit.php';


require_once APP_ROOT . 'view/common/layout.formview.php';
require_once APP_ROOT . 'view/common/layout.view.php';

class EventEditPage extends PageController {

	var $form;
	var $view;

    function EventEditPage() {
        parent::PageController();
        $this->form =& new EventFormController();
        $this->form->setUserType(true,true);
        $this->addChild('EventForm', $this->form);
        $this->setDefaultChild('EventForm');

        // pass form controller as a parameter
        $this->view =& new EventEditView('/common/events/event.edit.html', $this->form);
        $this->form->setView($this->view);

        $this->setDefaultView($this->view);

        $this->addView('success', WACT_DEFAULT_VIEW);
        $this->addView('notfound', WACT_DEFAULT_VIEW);
        $this->addView('delete', new Handle('RedirectView', array('/delete')));
        $this->addView('index', new Handle('RedirectView', array('/')));
        $this->addView('createOK', new Handle('RedirectView', array('/')));
        $this->addView('saveOK', new Handle('RedirectView', array('/')));
        $this->addView('cleanOK', WACT_DEFAULT_VIEW);
        $this->addView('this', WACT_DEFAULT_VIEW);
    }
}

?>